package jing.controller;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import jing.pojo.UserInfoCustom;
import jing.pojo.UserInfoVo;
import jing.service.UserInfoService;


/**
 * @author Administrator
 * 本类是用来测试方法的回显的
 */
@Controller()
@RequestMapping("/user")
public class testUserInfoController {
	@Autowired
	private UserInfoService userInfoService;
	
	@RequestMapping("/fangfahuixian")
	public String selectUserInfo(Map<String,String> userInfoMap,String[] userInfoArray,Model model, HttpServletRequest request,UserInfoVo userInfoVo) throws Exception {
		//pojo嵌套类型
		List<UserInfoCustom> listUserInfoCustom = userInfoService.selectUserInfo(userInfoVo);
		//数组类型
		//listUserInfoCustom = this.userInfoService.selectUserInfoByArray(userInfoArray);
		//list类型
		//list类型必须放在pojo类里面使用，由于比较麻烦这里只写到了controller层
		userInfoVo.getUserInfoList();
		//HashMap类型 和list类型差不多 
		userInfoVo.getUserInfoMap();
		model.addAttribute("listUserInfoCustom", listUserInfoCustom);
		return "userList";
	}
}
